Row

Oregon Adult Mask Noncompliance and Risk of Harmful Response to Student Mask Noncompliance

Row

Other Resources

View this information on an interactive map.
Go to Oregon Department of Education (ODE) Covid-19 Resources webpage.

---
title: "Oregon Table of Adult Mask Noncompliance and Risk of Harmful Response to Student Mask Noncompliance"
author: "Rebecca Amodeo"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    source_code: embed
---

```{r setup, include=FALSE}
pacman::p_load(plotly, maps, readr, dplyr, ggthemes, ggrepel, ggfittext)
knitr::opts_chunk$set(message = FALSE)
```

Row {data-height=800}
------------------------------------------------------------------------------

### Oregon Adult Mask Noncompliance and Risk of Harmful Response to Student Mask Noncompliance
```{r echo=FALSE, warning=FALSE}
pacman::p_load(reactable)
nicedf <- read_csv("C:/My_R/crime_health_sp_2020/data/nicedf.csv")
nicetable <- nicedf %>%
  select(-c(X1, fips, county_rank_in_healthcare_for_kids))

orange_pal <- function(x) rgb(colorRamp(c("#ffe4cc", "#ff9500"))(x), maxColorValue = 255)

reactable(nicetable,
          filterable = TRUE,
          highlight = TRUE,
          defaultPageSize = 36, columns = list(
            county_name = colDef(name = "Oregon County"),
            county_rank_in_adult_mask_use = colDef(name = "Rank in Adult Mask Use",
                                                   style = function(value) {
              normalized <- (value - min(nicetable$county_rank_in_adult_mask_use)) /
                (max(nicetable$county_rank_in_adult_mask_use) -
                   min(nicetable$county_rank_in_adult_mask_use))
              color <- orange_pal(normalized)
              list(background = color)}),
            rri_risk_n = colDef(name = "Relative Risk of Harmful Discipline",
                                                        style = function(value) {
              normalized1 <- (value - min(nicetable$rri_risk_n)) /
                (max(nicetable$rri_risk_n) -
                   min(nicetable$rri_risk_n))
              color <- orange_pal(normalized1)
              list(background = color)})
            ))
```

Row {data-height=200}
------------------------------------------------------------------------------

### Other Resources  
View this information on an [interactive map](insert-link).  
Go to Oregon Department of Education (ODE) [Covid-19 Resources webpage](insert-link).